{%- set enable_logging = salt['pillar.get']('default:OMV_ONEDRIVE_ENABLELOGGING', 'false') -%}
{%- set verbose = salt['pillar.get']('default:OMV_ONEDRIVE_VERBOSE', '0') -%}
{%- set sync_dir_permissions = salt['pillar.get']('default:OMV_ONEDRIVE_SYNCDIRPERMISSIONS', '750') -%}
{%- set sync_file_permissions = salt['pillar.get']('default:OMV_ONEDRIVE_SYNCFILEPERMISSIONS', '640') -%}
{%- set monitor_fullscan_frequency = salt['pillar.get']('default:OMV_ONEDRIVE_MONITORFULLSCANFREQUENCY', '12') -%}
{%- set sf_path = salt['omv_conf.get_sharedfolder_path'](config.sharedfolderref) -%}
{{ pillar['headers']['multiline'] -}}
enable_logging = "{{ enable_logging | to_bool | yesno('true,false') }}"
verbose = "{{ verbose }}"
sync_dir = "{{ sf_path }}"
sync_dir_permissions = "{{ sync_dir_permissions }}"
sync_file_permissions = "{{ sync_file_permissions }}"
local_first = "{{ ((config.replicationmode == 'updown') and config.localfirst) | to_bool | yesno('true,false') }}"
no_remote_delete = "{{ ((config.replicationmode == 'up') and config.noremotedelete) | to_bool | yesno('true,false') }}"
cleanup_local_files = "{{ ((config.replicationmode == 'down') and config.cleanuplocalfiles) | to_bool | yesno('true,false') }}"
download_only = "{{ (config.replicationmode == 'down') | to_bool | yesno('true,false') }}"
upload_only = "{{ (config.replicationmode == 'up') | to_bool | yesno('true,false') }}"
skip_dotfiles = "{{ config.skipdotfiles | to_bool | yesno('true,false') }}"
monitor_interval = "{{ config.monitorinterval }}"
monitor_fullscan_frequency = "{{ monitor_fullscan_frequency }}"
rate_limit = "{{ config.ratelimit }}"
{%- if config.extraoptions | length > 0 %}
{{ config.extraoptions }}
{%- endif %}
# Fix issues related to curl that is installed by Debian.
# https://github.com/abraunegg/onedrive/blob/master/docs/usage.md#compatibility-with-curl
force_http_11 = "true"
ip_protocol_version = "1"
# Do not display the warning message on startup.
disable_notifications = "true"
